
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>

<%@ page import="java.util.List"
 %>

<%@ page import="java.util.Date"
 %>
 
<%@ page import="com.stoneapple.timesheet.entity.Timesheet" %>

<%
	List<Timesheet> timesheets = (List) request.getAttribute("timesheets");
	%>


<%@ include file="header1.jsp" %>

		<form action="/create" method="post" accept-charset="utf-8">
	<table align="center">
		<tr>
			<td style="text-align: right;"><label for="projectcode">Project Code:</label></td>
			<td><input type="text" name="projectcode" id="projectcode" size="25" /></td>
		
		  <td><label for="assignmentname">Assignment Name:</label></td>
			
		  
			<td><input type="text" name="assignmentname" id="assignmentname" size="30" />
		  </td>
		
			<td><label for="hours">Hours:</label></td>
			
				<td><input type="text" name="hours" id="hours" size="10" />
			</td>
		
			<td></td>
			<td>
				<div id="submit-area">
					<button type="submit" class="button-blue">Add</button>
				</div>
			</td>
		</tr>		
  </table>

</form>
<br> 
<table  width="50%" border="1" align="center">
	<tr>
		<th width="269">Project Code </th>
		<th width="491">Assignment Name </th>
		<th width="226"><div align="center">Hours</div></th>
		<th width="78" style="min-width: 45px;">&nbsp;</th>
	</tr>
	<% for (Timesheet timesheet : timesheets) { %>
	<tr>
		<td><%=timesheet.getProjectcode()%></td>
		<td><%=timesheet.getAssignmentname()%></td>
		<td><%=timesheet.getHours()%> </td>
	
		<td style="text-align: center;"><a class="delete" href="/delete?id=<%=timesheet.getId()%>">Delete</a>	
		</td>
	</tr>
	<% } %>
</table>




